﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminPanel/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<WebMVC.Areas.AdminPanel.Models.ProductViewModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            
            <th>
                Id
            </th>
            <th>
                Preview
            </th>
            <th>
                Style
            </th>
            <th>
                Industry
            </th>
            <th>
                Create Date
            </th>
            <th>
                Name
            </th>
            <th>Actions</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            
            <td>
                <%: item.Id %>
            </td>
            <td>
                <img class="img-small-preview" src="<%: item.ThumbnailPath %>" alt="<%: item.Name %>" />
            </td>
            <td>
                <strong><%=DataRes.StaticStrings.ResourceManager.GetString(item.StyleCode) %></strong>
            </td>
            <td>
                <strong><%=DataRes.StaticStrings.ResourceManager.GetString(item.IndustryCode) %></strong>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreateDate) %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id = item.Id }, new {@class="icon-link edit-link" })%> |
                <%= Html.ActionLink("Details", "Details", new { id = item.Id }, new { @class = "icon-link details-link" })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id = item.Id }, new { @class = "icon-link delete-link" })%>
            </td>
        </tr>
    
    <% } %>

    </table>
    <div class="paging-list">
                    <% Html.RenderPartial("PagingControl", ViewData["pages"] as WebMVC.Areas.AdminPanel.Models.PagingViewModel); %>
     </div>
    <p>
       <%= Html.ActionLink("Create New", "Create", null, new { @class = "icon-link create-link" })%>
    </p>

</asp:Content>

